/**
 * 
 */
package co.fitstart.coach.service.impl;

import java.util.List;

import org.springframework.stereotype.Service;

import com.demo2do.core.persistence.annotation.Dynamic;
import com.demo2do.core.service.impl.GenericServiceImpl;

import co.fitstart.coach.dao.StudentDao;
import co.fitstart.coach.service.StudentService;
import co.fitstart.entity.coach.CoachStudentRelation;
import co.fitstart.entity.course.CourseType;
import co.fitstart.entity.principal.Principal;
import co.fitstart.entity.user.Student;

/**
 * @author downpour
 *
 */
@Service("studentService")
public class StudentServiceImpl extends GenericServiceImpl<Student> implements StudentService {
    
    @Dynamic
    private StudentDao studentDao;
    
    /*
     * (non-Javadoc)
     * @see co.fitstart.coach.service.StudentService#listStudent(co.fitstart.entity.principal.Principal, co.fitstart.entity.course.CourseType)
     */
    public List<CoachStudentRelation> listStudent(Principal principal, CourseType courseType) {
        
        return studentDao.listCoachStudentRelation(principal, courseType);
    }
    
}
